package com.example.demo.proxy;

/**
 * Created with IntelliJ IDEA 2023.
 * Description:
 * User: homechen
 * Date: 2024-03-11
 * Time: 13:14
 */
public class TestMain {
    public static void main(String[] args) {
        // 代理对象
        RealSubject realSubject = new RealSubject();
        // 代理类
        HouseProxy proxy = new HouseProxy(realSubject);
        // 通过代理类去访问目标方法
        proxy.rentHouse();
    }
}
